package unit2;


public class Ex2_20_MulArray {
    public static void main(String[] args) {
        int arrayA[][] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};
        System.out.println(arrayA[0][0] + "  " + arrayA[0][1] + "  " + arrayA[0][2]);
        System.out.println(arrayA[1][0] + "  " + arrayA[1][1] + "  " + arrayA[1][2]);
        System.out.println(arrayA[2][0] + "  " + arrayA[2][1] + "  " + arrayA[2][2]);
        System.out.println();
        arrayA[0][0] = arrayA[0][1] + arrayA[0][2];
        arrayA[1][1] = arrayA[1][0] + arrayA[1][2];
        arrayA[2][2] = arrayA[2][0] + arrayA[2][1];
        for (int i = 0; i <= 2; i++) {
            for (int j = 0; j <= 2; j++)
                System.out.print(arrayA[i][j] + "  ");
            System.out.println();
        }
    }
}
